<template>
    <section class="content">
        <!--轮播图-->
        <swiper class="slider" :options="options">
            <swiper-slide>
                <img src="../../../../assets/images/lb1.png" alt="">
            </swiper-slide>
            <swiper-slide>
                <img src="../../../../assets/images/lb2.png" alt="">
            </swiper-slide>
            <swiper-slide>
                <img src="../../../../assets/images/lb3.png" alt="">
            </swiper-slide>
            <div class="swiper-pagination" slot="pagination"></div>
        </swiper>
        <!--输入发布内容-->
        <section class="bbs">
            <div class="text">
                <img src="../../../../assets/images/aside.png" alt="">
                <input type="text" placeholder="说点什么？" v-model="textarea">
                <div class="comment">
                    <div class="item">
                        <span><i class="el-icon-picture-outline"></i>表情</span>
                        <span><i class="el-icon-picture-outline"></i>图片</span>
                        <span><i class="el-icon-picture-outline"></i>长文</span>
                    </div>
                    <div class="button">
                        <span>取消</span>
                        <span class="active">发布</span>
                    </div>
                </div>
            </div>
            <!--展示区-->
            <div class="topic">
                <el-tabs v-model="activeName">
                    <el-tab-pane label="全部" name="first"></el-tab-pane>
                    <el-tab-pane label="讨论" name="second"></el-tab-pane>
                    <el-tab-pane label="资讯" name="third"></el-tab-pane>
                    <el-tab-pane label="公告" name="fourth"></el-tab-pane>
                </el-tabs>
                <section>
                    <div class="main">
                        <img src="../../../../assets/images/tx1.png" alt="">
                        <h2>佛山氢能产业新突破 开通世界首条商业运营氢能源有轨电车</h2>
                        <p>中新网佛山11月29日电
                            (王坚)2019年佛山氢能源产业交流峰会暨世界首条商业运营氢能源有轨电车上线启动仪式(下称“峰会”)28日至29日在佛山举行，会上宣布世界首条商业运营氢能源有轨电车29日在佛山高明正式投入运营。
                            <img src="../../../../assets/images/tx.png" alt=""><span>先立洋 10月12日 11:20</span>
                        </p>
                    </div>
                    <img class="img" src="../../../../assets/images/bbs-pic.png" alt="">
                    <ul>
                        <li><i class="el-icon-star-off"></i>转发</li>
                        <li><i class="el-icon-star-off"></i>评论</li>
                        <li><i class="el-icon-star-off"></i>赞</li>
                        <li><i class="el-icon-star-off"></i>收藏</li>
                        <li><i class="el-icon-star-off"></i>投诉</li>
                    </ul>
                </section>
                <section>
                    <div class="main">
                        <img src="../../../../assets/images/tx1.png" alt="">
                        <h2>佛山氢能产业新突破 开通世界首条商业运营氢能源有轨电车</h2>
                        <p>中新网佛山11月29日电
                            (王坚)2019年佛山氢能源产业交流峰会暨世界首条商业运营氢能源有轨电车上线启动仪式(下称“峰会”)28日至29日在佛山举行，会上宣布世界首条商业运营氢能源有轨电车29日在佛山高明正式投入运营。
                            <img src="../../../../assets/images/tx.png" alt=""><span>先立洋 10月12日 11:20</span>
                        </p>
                    </div>
                    <img class="img" src="../../../../assets/images/bbs-pic.png" alt="">
                    <ul>
                        <li><i class="el-icon-star-off"></i>转发</li>
                        <li><i class="el-icon-star-off"></i>评论</li>
                        <li><i class="el-icon-star-off"></i>赞</li>
                        <li><i class="el-icon-star-off"></i>收藏</li>
                        <li><i class="el-icon-star-off"></i>投诉</li>
                    </ul>
                </section>
                <section>
                    <div class="main">
                        <img src="../../../../assets/images/tx1.png" alt="">
                        <h2>佛山氢能产业新突破 开通世界首条商业运营氢能源有轨电车</h2>
                        <p>中新网佛山11月29日电
                            (王坚)2019年佛山氢能源产业交流峰会暨世界首条商业运营氢能源有轨电车上线启动仪式(下称“峰会”)28日至29日在佛山举行，会上宣布世界首条商业运营氢能源有轨电车29日在佛山高明正式投入运营。
                            <img src="../../../../assets/images/tx.png" alt=""><span>先立洋 10月12日 11:20</span>
                        </p>
                    </div>
                    <img class="img" src="../../../../assets/images/bbs-pic.png" alt="">
                    <ul>
                        <li><i class="el-icon-star-off"></i>转发</li>
                        <li><i class="el-icon-star-off"></i>评论</li>
                        <li><i class="el-icon-star-off"></i>赞</li>
                        <li><i class="el-icon-star-off"></i>收藏</li>
                        <li><i class="el-icon-star-off"></i>投诉</li>
                    </ul>
                </section>

            </div>
            <!--加载更多-->
            <div class="more">
                <h4>加载更多</h4>
            </div>
        </section>
    </section>
</template>

<script>
    import {swiper, swiperSlide} from 'vue-awesome-swiper'
    // require styles
    import 'swiper/dist/css/swiper.css'

    export default {
        components: {swiper, swiperSlide},
        data() {
            return {
                textarea: '',
                activeName: 'first',
                // 轮播图属性
                options: {
                    autoplay: {
                        delay: 2500,
                        disableOnInteraction: false
                    },
                    pagination: {
                        el: '.swiper-pagination',
                        clickable: true
                    },
                }
            }
        }
    }
</script>

<style scoped lang="scss">
    .content {
        width: 725px;
        /*轮播图*/
        .slider {
            img {
                height: 270px;
                width: 725px;
            }
        }


        .bbs {
            margin-top: 5px;
            background: #fff;
            /*评论发布*/
            .text {
                padding: 54px 20px 20px;
                position: relative;
                > img {
                    display: inline-block;
                    vertical-align: middle;
                }

                > input {
                    margin-left: 10px;
                    width: 620px;
                    height: 46px;
                    line-height: 46px;
                    outline: none;
                    border-radius: 5px;
                    border: 1px solid #edf0f5;
                    color: #999;
                    padding-left: 10px;
                    &::placeholder{
                        color: #ccc;
                    }
                }
            }

            .comment {
                padding: 2px 10px 0 59px;
                height: 30px;
                line-height: 30px;

                .item {
                    font-size: 14px;
                    color: #bfbfbf;
                    cursor: pointer;
                    float: left;

                    > span {
                        margin-right: 16px;
                        height: 41px;
                        line-height: 41px;

                        i {
                            margin-right: 5px;
                            font-size: 15px;
                        }
                    }
                }

                .button {
                    text-align: center;
                    float: right;

                    > span {
                        font-size: 14px;
                        color: #999;
                        display: inline-block;
                        width: 64px;
                        height: 41px;
                        line-height: 41px;
                        cursor: pointer;
                    }

                    .active {
                        background: #edf0f5;
                        border-radius: 2px;
                    }

                }
            }

            /*新闻*/
            .topic {
                margin-top: 10px;
                section {
                    padding: 10px 30px 10px 83px;
                    /*内容区域*/
                    .main {
                        width: 610px;
                        position: relative;
                        > img {
                            position: absolute;
                            display: block;
                            height: 32px;
                            width: 32px;
                            left: -42px;

                        }
                        > h2 {
                            font-size: 18px;
                            color: #19b955;
                            height: 40px;
                            line-height: 40px;
                            font-weight: 800;
                            @include ellipsis;
                        }

                        > p {
                            font-size: 14px;
                            color: #000;
                            height: auto;
                            line-height: 30px;
                            white-space: normal;
                            text-align: left;
                            >img{
                                vertical-align: middle;
                                width: 23px;
                                height: 23px;
                            }
                            >span{
                                color: #999;
                                vertical-align: middle;

                            }
                        }
                    }
                    .img{
                        margin: 15px 0;
                        width: 294px;
                        height: 197px;
                        display: block;
                    }
                    ul{
                        display: flex;
                        li{
                            margin-right: 10px;
                            cursor: pointer;
                            i{
                                font-size: 15px;
                                margin-right: 5px;
                            }
                        }
                    }
                }
            }

            .more{
                padding: 40px;
                h4{
                    margin: 0 auto;
                    height: 30px;
                    line-height: 30px;
                    width: 200px;
                    background: #e6f1fb;
                    cursor: pointer;
                    text-align: center;
                    color: #888;
                    font-size: 14px;
                    border-radius: 2px;
                }
            }
        }
    }
</style>

<style lang="scss">
    .el-tabs__active-bar {
        background-color: #19b955;
        width: 70px !important;
    }

    .el-tabs__item.is-active {
        color: #19b955;
    }

    .el-tabs__item {
        padding: 0;
        width: 75px;
        text-align: center;
    }

    .el-tabs__item:hover {
        color: #19b955;
    }

    .el-tabs__nav-wrap::after {
        height: 1px;
        background-color: #edf0f5;
    }
</style>
